﻿using Abp.Runtime.Session;
using Mt.Site.Application.FileUpload.Dto;
using Mt.Site.Core.Base.Utils.FileIO.Upload;
using Mt.Site.Core.Storage;
using Mt.Site.Core.Storage.File_;
using Mt.Site.Core.Synchronization;
using System;
using System.Threading.Tasks;

namespace Mt.Site.Application.FileUpload
{
    public interface IFileUploadHelper
    {
        Task<UpfileTemplate.Para> GetUpFileConfig(string customKey, string alias);

        Task<UpfileTemplate> GetUploadConfigurationAsync(string customKey);

        Task<FileInfoDto> CreateFileInfo(
            IFileObjectManager fileObjectManager, Guid contentId, string alias, bool isTemporary,
            UploadFileInfo uploadFileInfo, string fileOriginName, string exName, FileScoureName sourceName);

        Task<FileInfoDto> CreateFileInfo2(IFileObjectManager fileObjectManager, SelectFromLibraryInput input, string fileName, string exName);

        Task OnDeleted(string fileUrl, Guid id);
        
        Task OnEdited(string fileUrl, Guid id, bool isPreViewImgUrl);
        
        Task OnMultiUploaded(string fileUrl, Guid id);
        
        Task OnSingleUploaded(string fileUrl, Guid id);
        
        Task RemoveStaticPageAndSyncFileObject(Guid contentId, Guid fileObjectId, OptionType optionType, IAbpSession AbpSession);
    }
}